﻿namespace PgBirdie.Core.Model.Database.Structure.Constraint
{
    public class PgForeignKey : PgConstraintBase
    {        
        public string SourceColumnName { get; private set; }
        public string ReferenceTableName { get; private set; }
        public string ReferenceColumnName { get; private set; }
        public string MatchType { get; private set; }

        public PgForeignKey(string name, PgTable table, ConstraintType constraintType,
            string sourceColumnName, string referenceTableName, string referenceColumnName, string matchType)
            : base(name, table, constraintType)
        {
            SourceColumnName = sourceColumnName;
            ReferenceTableName = referenceTableName;
            ReferenceColumnName = referenceColumnName;
            MatchType = matchType;
        }
    }
}